package design.agent;

/**
 * \* User: Administrator
 * <p>
 * \* Date: 2020/9/22
 * <p>
 * \* Time: 10:36
 * <p>
 * \* Description: 采购、销售、库存耦合 互相依赖， 引入中介者，每个模块之间不再相互交流，交流通过中介者
 * \
 */
public class Client {
    public static void main(String[] args) {
        Purchase purchase = new Purchase();
        purchase.buyIBMcomputer(100);
        Sale sale = new Sale();
        sale.sellIBMComputer(1);
        Stock stock = new Stock();
        stock.clearStock();
    }
}
